@layout("/common/_container.html"){
<div class="ibox float-e-margins">
    <div class="ibox-content">
        <div class="form-horizontal" id="isRevisitInfoForm">
            <div style="display: none">
                <input type="hidden" id="reservationsId" value="${reservationsInfo.id}"/>
                <input type="hidden" id="isReturnVisit"/>
                <input type="hidden" id="statusValue" value="${reservationsInfo.status}"/>
                <div><textarea id="remarksOfReturnVisit" name="remarksOfReturnVisit" rows=8 cols=150></textarea>
                </div>
            </div>
            <div>
                姓名： ${reservationsInfo.customerName}&nbsp
                电话： ${reservationsInfo.customerPhone}&nbsp
                性别： ${reservationsInfo.sex}&nbsp
                年龄： ${reservationsInfo.customerAge}&nbsp
            </div>
            <div class="row">
                <label class="control-label"> 备注</label>
                <div><textarea id="remarks" name="remarks" rows=5 cols=150>${reservationsInfo.remarks}</textarea></div>
            </div>
            <div class="row">
                <label class="control-label"> 回访详情</label>
                <div><textarea id="huifang" name="huifang" rows=5 cols=150>${reservationsInfo.huifang}</textarea></div>
            </div>
            <div class="row">
                添加回访详情：
                <div><textarea id="revisitContent" name="revisitContent" rows=5 cols=150></textarea>
                </div>
            </div>
            <div class="row">
                <input type="radio" name="radio" id="revisit" checked="checked" value="回访"/>回访
                <input type="radio" name="radio" id="noRevisit" value="不回访"/>不回访
            </div>
            <div id="url2" class="row">
                不回访原因：
                <div><textarea id="causeOfNoReturnVisit" name="causeOfNoReturnVisit" rows=5 cols=150></textarea>
                </div>
            </div>
            <div id="url1" class="row">
                <div class="col-sm-6">
                    <#input id="reservations" name="预约回访人" value="${reservations}"/>
                    <#input id="appointmentTime" name="预约回访时间" type="datetime"
                            clickFun="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"/>
                    <label class="col-sm-3 control-label">状态</label>
                    <div class="col-sm-9">
                        <select class="form-control" id="statuss" name="statuss">
                            <option value="预约">预约</option>
                            <option value="待定">待定</option>
                            <option value="跟进">跟进</option>
                            <option value="过期">过期</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="row btn-group-m-t">
                <div class="col-sm-10">
                    <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="IsRevisitInfoDlg.addIsRevisitsd()"/>
                    <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="IsRevisitInfoDlg.close()"/>
                </div>
            </div>
        </div>
        <div class="row">
            <label class="control-label"> 咨询内容</label>
            <div><textarea id="content" name="content" rows=5 cols=150>${reservationsInfo.content}</textarea>
            </div>
        </div>
        <div class="row">
            <label class="control-label"> 医生点评</label>
            <div><textarea id="jiedaiContent" name="jiedaiContent" rows=5
                           cols=150>${reservationsInfo.jiedaiContent}</textarea>
            </div>
        </div>
        <div class="row">
            <label class="control-label"> 消费明细</label>
            <div><textarea id="xiaofeiContent" name="xiaofeiContent" rows=5
                           cols=150>${reservationsInfo.xiaofeiContent}</textarea>
            </div>
        </div>
    </div>
    <script src="${ctxPath}/static/modular/tcCenter/consultant/is_revisit_info.js"></script>
    <script>

        var seletestatus = $('#statusValue').val();
        if (seletestatus != "") {
            $("#status option[value=" + seletestatus + "]").attr("selected", "selected");
        }

        $("ul#sortRevisit").on("click", "li", function () {      //只需要找到你点击的是哪个ul里面的就行
            $.ajax({
                url: Feng.ctxPath + "/consultant/getRevisitContent",
                type: "post",
                data: {
                    "revisitTime": $(this).text(),
                    "reservationsId": $("#reservationsId").val()
                },
                success: function (data) {
                    $('#revisitContentDiv').html('<textarea id="revisitContents" name="revisitContents" rows=5 cols=70>' + data.revisitContent + '</textarea>');
                    $('#revisitInformation').html('<div>  ' +
                        ' 姓名：  ${reservationsInfo.customerName}  &nbsp 性别：  ${reservationsInfo.sex} ' +
                        ' &nbsp 年龄： ${reservationsInfo.customerAge}&nbsp 电话： ${reservationsInfo.customerPhone} </div>');
                    $('#revisitInformation2').html('<div> 回访人：' + data.revisit + '</div>');
                },
                error: function (data) {
                    alert('内部故障!');
                }
            });
        });
        //点击时间框样式变化
        var dom = document.getElementById("sortRevisit");
        var domchilds = document.getElementsByClassName("ui-state-default");
        dom.onclick = function (e) {
            var ev = e.event || window.event;
            for (var i = 0; i < domchilds.length; i++) {
                domchilds[i].style.borderColor = '#d3d3d3';
            }
            ev.target.style.borderColor = 'red';
        }
    </script>
    @}
